package org.opens.netty.initializer;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelInitializer;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import org.opens.netty.handle.BootNettyChannelInboundHandlerAdapter;

/**
 * 功能描述
 *
 * @author: zhangyuming
 * @date: 2023/12/6 14:32
 */
@ChannelHandler.Sharable
public class TcpClientChannelInitializer<SocketChannel> extends ChannelInitializer<Channel> {

    @Override
    protected void initChannel(Channel ch) throws Exception {
        ch.pipeline().addLast(new LoggingHandler(LogLevel.DEBUG));
        ch.pipeline().addLast(new BootNettyChannelInboundHandlerAdapter());
    }

}
